//删除操作
$('.cs_menu_table #del').click(function(){
	var id = $(this).attr('attr-id');
	var url=SCOPE.del_url+'&id='+id;
	var message=$(this).attr('attr-message');
	
	var data={};
	data['id'] = id;
	data['status'] = -1;
	
	layer.open({
		type:0,
		title:'是否删除',
		btn:['yes','no'],
		icon:3,
		closeBtn:2,
		content:"是否确定"+message,
		scrollbar:true,
		yes:function  () {
			todel(url,data);
		}
	});

});

//审核操作
$('.cs_menu_table #check').click(function(){
	var id = $(this).attr('attr-id');
	var url=SCOPE.check_url+'&id='+id;
	var message=$(this).attr('attr-message');
	
	var data={};
	data['id'] = id;
	data['status'] = 1;
	
	layer.open({
		type:0,
		title:'审核操作',
		btn:['yes','no'],
		icon:3,
		closeBtn:2,
		content:"是否确定"+message,
		scrollbar:true,
		yes:function  () {
			todel(url,data);
		}
	});

});

function todel (url,data) {
	$.post(url,data,function  (s) {
		if (s.status==1) {//跳转
			return dialog.success(s.message,'');
		} else{
			return dialog.error(s.message);
		}
	},'JSON');
}